<template>
  <div class="app">
    <!-- 搜索栏 -->
    <search-bar></search-bar>
    <div v-if="isCadre" class="addActivity" @click = "addActivity">
      <div><h4>申请活动</h4></div>
      <i class="fa fa-chevron-right" aria-hidden="true"></i>
    </div>
    <router-view />
  </div>
</template>

<script>
import SearchBar from '../../components/search-bar'
export default {
  components: {
    SearchBar
  },
  data() {
    return {
      isCadre:false
    }
  },
  methods: {
    addActivity(){
      this.$router.push('/editingActivity')
    }
  },
  mounted() {
    if(this.$store.getters['user/roleName']=='学生干部'){
        this.isCadre = true
    }
  },
}
</script>

<style scoped>
.addActivity{
  display: flex;
  justify-content: space-between;
  height: 50px;
  background: white;
  align-items: center;
  padding: 0 20px;
  color: #636e72
}

.app {
  padding-top: 50px;
}
/* 筛选菜单 */
.filter-menu {
  display: flex;
  justify-content: space-between;
  position: fixed;
  top: 50px;
  width: 100%;
}
.filter-menu>li {
  height: 40px;
  line-height: 40px;
  flex-grow: 1;
  text-align: center;
  background-color: white;
  font-size: 14px;
  color: #888;
}
.filter-menu>li.select {
  border-bottom: 1px solid #0fbcf9;
  color: #0fbcf9;
}


</style>
